{% extends "base.html" %}
{% block title %}GAE文件浏览{% endblock %}
{% block main %}

<table id="ver-zebra">
    <tr>
        <th>文件列表</th>
        <th><a href="/manage/">文件管理</a> </th>
        <th>{% if user_greeting %} {{user_greeting}} {% endif %}</th>
    </tr>
</table>

<table id="newspaper-a">
<thead>
<tr>
    <th>ID</th>
    <th>Name</th>
    <th>Size(Bytes)</th>
    <th>Created at</th>
    <th>Thumbnail</th>
</tr>
</thead>
<tbody>
{% for file in files %}
<tr>
    <td>{{file.id}}</td>
    <td><a href="{{file.downurl}}">{{file.name}}</td>
    <td>{{file.size}}</td>
    <td>{{file.created_at}}</td>
    <td>    
        {% if file.isimage %}
            <a href='{{file.showurl}}'><img width='150' src='{{file.downurl}}'> </a>
        {% endif %}
    </td>
</tr>
{% endfor %}
</tbody>
</table>
<table id="ver-zebra">
    <tr>
        <th>{% if prev %}<a href="{{prev}}">上一页</a>{% endif %}</th>
        <th>{% if next %}<a href="{{next}}">下一页</a>{% endif %}</th>
    </tr>
</table>

{% endblock %}
</body>
</html>
